PROJECT(project)
cmake_minimum_required(VERSION 2.6)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall  -O2")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -O2")
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
	add_definitions(-DWEBRTC_WIN)
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
	add_definitions(-DWEBRTC_POSIX -DWEBRTC_LINUX)
endif()
SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall  -O2")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -O2")
set(CMAKE_CXX_FLAGS "-fPIC")  
set(CMAKE_C_FLAGS "-fPIC") 
add_definitions(-D__STDC_FORMAT_MACROS)
add_definitions(-DNDEBUG)
add_definitions(-std=c++11  )#-fno-rtti
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_subdirectory(rtc_base)
add_subdirectory(modules)
add_subdirectory(api)
add_subdirectory(system_wrappers)
add_subdirectory(logging)
add_subdirectory(test)
include_directories(.)
set(EXECUTABLE_NAME "demo")
add_executable(${EXECUTABLE_NAME} pacesendertest.cc)
target_link_libraries(${EXECUTABLE_NAME} system_wrappers rtc_base api  logging  utility pacing)
set(EXECUTABLE_NAME "delay")
add_executable(${EXECUTABLE_NAME} delay_bwe.cc)
target_link_libraries(${EXECUTABLE_NAME} system_wrappers rtc_base api  logging  utility pacing bitrate_controller congestion_controller remote_bitrate_estimator)
set(EXECUTABLE_NAME "test_filed")
add_executable(${EXECUTABLE_NAME} testfield.cc)
target_link_libraries(${EXECUTABLE_NAME} field_trial system_wrappers rtc_base)

